package org.mikeliu.exp4.homework2;
import java.util.Scanner;
public class Main
{
    public static void main(String[] args)
    {
        Scanner scanner=new Scanner(System.in);
        int[] array=new int[10];
        int sum=0;
        for(int i=0;i<10;i++)
        {
            array[i]=scanner.nextInt();
            if(i%2==0)array[i]=array[i]*2;
            if(i%2!=0)array[i]=array[i]+2;
            sum+=array[i];
        }
        System.out.print(sum);
    }
}